<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<script language="VB" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
	if not Page.IsPostBack then
	Dim myConn As SqlConnection
	Dim MyCommand As SqlCommand
	Dim strConn as string = _
	ConfigurationSettings.appSettings("conn")
	Dim strDelete As String
        	strDelete =" Delete from tblCategories" 
	strDelete + ="  Where CateID='" 
	strDelete += Request.QueryString("id")
        	strDelete +="'"
	myConn = New SqlConnection(strConn)
	MyCommand = _
	New SqlCommand(strDelete, myConn)
	myConn.Open()
	'Doc tu sach de biet phat bieu khai bao o day
        	myConn.close
	end if
	response.redirect("SqlDataGridDelete.aspx")
End Sub
</script>
